<script lang="ts" setup>
import {
  Menu as IconMenu,
  UserFilled,
  Setting,
  House,
  Tickets,
  Notebook,
} from '@element-plus/icons-vue'
import router from '@/router'

import { ref, onMounted } from 'vue'
import { GetUser } from "@/utils/lStorage"


const flagSowUserMgr = ref(false)
const userInfo = ref({})

onMounted(() => {
  const user = GetUser()
  // console.log(user)
  if (user == null || user.UserId == 0){
    router.push({ path: '/login' })
    return 
  }
    userInfo.value = user

    if (user.userType == "admin") {
      flagSowUserMgr.value = true
    }

    return
})



</script>
<template>
<!--   <div class="aside">
  <el-row > -->
    <!-- <el-col :span="24"> -->
      <el-menu default-active="2" :router=true
        active-text-color="#ffd04b"
        background-color="#0f59a4"
        text-color="#fff"
        class="aside"
      >
<!--         <el-menu-item index="/dashboard">
          <el-icon>
            <House />
          </el-icon>
          <span>看板</span>
        </el-menu-item> -->
<!-- 
       <el-menu-item index="/product/list">
          <el-icon>
            <Tickets />
          </el-icon>
          <span>产品列表</span>
        </el-menu-item>
 -->
       <el-menu-item index="/tasklog/list">
          <el-icon>
            <Tickets />
          </el-icon>
          <span>产品列表</span>
        </el-menu-item>

<!--         <el-menu-item index="/task/list">
          <el-icon>
            <Tickets />
          </el-icon>
          <span>任务列表</span>
        </el-menu-item> -->

      <el-menu-item index="/group/list">
          <el-icon>
            <Tickets />
          </el-icon>
          <span>分组列表</span>
        </el-menu-item>


        <el-menu-item index="/device/list">
          <el-icon>
            <Tickets />
          </el-icon>
          <span>设备列表</span>
        </el-menu-item>

<!--       <el-menu-item index="/config/list">
          <el-icon>
            <Tickets />
          </el-icon>
          <span>配置列表</span>
        </el-menu-item> -->

   

      </el-menu>

</template>

<style scoped>

.aside{
  background-color: #0f59a4;

}
</style>